<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>Title</title>
</head>
<body>
<br/>
<jsp:include page="top.jsp"></jsp:include>
<hr/>
<table border="1px">
    <tr>
        <td colspan="9" align="center">
            <a href="/yg/toTj.do">员工添加</a>
        </td>
    </tr>
    <tr>
        <th>员工姓名</th>
        <th>员工性别</th>
        <th>员工生日</th>
        <th>联系电话</th>
        <th>家庭住址</th>
        <th>员工职务</th>
        <th>状态</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
    </tr>
    <c:forEach items="${list}" var="yg">
        <tr>
            <td>${yg.name}</td>
            <td>${yg.sex}</td>
            <td>${yg.birthday}</td>
            <td>${yg.phoneno}</td>
            <td>${yg.address}</td>
            <td>${yg.job}</td>
            <td>${yg.status}</td>
            <td>
                <a href="/yg/toUpdateYg.do?id=${yg.id}">修改</a>
            </td>
            <td>
                <a href="/yg/delYg.do?id=${yg.id}" onclick="return delConfirm()">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
<script>
    function delConfirm() {
        if (confirm("确认删除？")) {
            return true;
        } else {
            return false;
        }
    }
</script>
</body>
</html>